home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmMain
- Caption = "String Passing"
- ClientHeight = 1620
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 3270
- LinkTopic = "Form1"
- ScaleHeight = 1620
- ScaleWidth = 3270
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton cmdWinDir
- Caption = "&Get Windows Directory"
- Default = -1 'True
- Height = 630
- Left = 570
- TabIndex = 0
- Top = 480
- Width = 2055
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Declare Function GetWindowsDirectory Lib "kernel32" _
- Alias "GetWindowsDirectoryA" _
- (ByVal lpBuffer As String, _
- ByVal nSize As Long) As Long
- Private Sub cmdWinDir_Click()
- Dim WinDir As String
- Dim ReturnSize As Long
- WinDir = String(255, 0)
- ReturnSize = GetWindowsDirectory(WinDir, Len(WinDir))
- WinDir = Left$(WinDir, ReturnSize)
- MsgBox "The Windows directory is: " & WinDir
- End Sub
-